﻿<UserControl x:Class="FIFP.Report.FieldEfficiencyMainPage"
   xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
    xmlns:local="clr-namespace:FIFP.Report.Report"
    xmlns:vm="clr-namespace:FIFP.Report.ViewModel"
    d:DesignHeight="300" d:DesignWidth="400">

    <UserControl.DataContext>
        <vm:ReportViewModel></vm:ReportViewModel>
    </UserControl.DataContext>
    <Grid x:Name="LayoutRoot" Background="#2a2f36" ShowGridLines="False">      
    	<Viewbox Stretch="Fill">
    		<Grid Height="1028" Width="1920" Margin="10">
    			
    			<Grid.ColumnDefinitions>
    				<ColumnDefinition Width="*" />
    			</Grid.ColumnDefinitions>
    			<Grid.RowDefinitions>
    				<RowDefinition Height="Auto" />
    				<RowDefinition Height="0.5*" />
    				<RowDefinition Height="0.5*" />
    			</Grid.RowDefinitions>

                <Grid Margin="0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="0.3*"></ColumnDefinition>
                        <ColumnDefinition Width="0.4*"></ColumnDefinition>
                        <ColumnDefinition Width="0.3*"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <TextBlock Text="{Binding ReportHeaderName}"  Foreground="Yellow" FontSize="18" FontWeight="Bold"  Grid.Column="1" Margin="0"/>
                    <StackPanel Visibility="{Binding DropDownVisibility}" Grid.Column="2" Orientation="Horizontal" Margin="0,2,33,0" HorizontalAlignment="Right">
                        <TextBlock TextWrapping="Wrap" Text="Selected Year: " Foreground="White" FontFamily="Calibri" FontSize="20" VerticalAlignment="Top" Margin="0,2,0,0"/>
                        <ComboBox x:Name="cmbYear" Tag="mc" ItemsSource="{Binding YearList}" SelectedItem="{Binding SelectedMCYear,Mode=TwoWay}" VerticalAlignment="Top" Style="{StaticResource ComboBoxStyleRightDropArrow}" Width="85" Height="30" ItemContainerStyle="{StaticResource ComboBoxItemStyle}">
                            <i:Interaction.Triggers>
                                <i:EventTrigger  EventName="SelectionChanged">
                                    <i:InvokeCommandAction Command="{Binding YearSelectionCommand}" CommandParameter="{Binding ElementName=cmbYear}"  />
                                </i:EventTrigger>
                            </i:Interaction.Triggers>
                        </ComboBox>
                    </StackPanel>
                </Grid>        
                
    			<!--<TextBlock Text="{Binding ReportHeaderName}"  Foreground="Yellow" FontSize="18" FontWeight="Bold"  Grid.ColumnSpan="2" Margin="0"/>-->
                
                <local:ReservoirCapacity x:Name="reservoirCapacity" Grid.Row="1" Margin="0,10,0,0"/>
    			<local:FieldEfficiencyCapacity x:Name="effectiveCapacity" Grid.Row="2" Margin="0,10,0,0"/>
    		</Grid>
    	</Viewbox>

    </Grid>
</UserControl>
